Capella Configurability and Validation Profiles

Principles

Capella Configurability feature allows to configure the application for a custom usage. Commands, validation rules and other Capella features can be customized using the standard Eclipse preferences mechanism.

There are three possible solutions to set a custom configuration:

  1. Using Workspace preferences
  2. Setting Capella Project specific preferences
  3. Referencing a Capella Configuration Project

The second solution overrides the first one. The third solution overrides the second one.

The basic idea is to disable/enable Eclipse preferences in the standard dedicated pages and then rely on export/import mechanisms to share them or configure a selected Capella Project.

The following preferences are available:

Migration features from one version to another are not supported for preferences configuration files (workspace preferences, Capella project specific preferences or Capella configuration project). Between minor versions (no modification of interfaces) these files shall be compatible (except if a validation rule referenced in a validation profile for instance is updated after a problem correction for instance).





Workspace Preferences

Setting Workspace Preferences

Workspace preferences are set using the standard Eclipse preferences page Editor available from menu window > Preferences.

Capella projects use by default Workspace preferences.



Fig.1: Setting Workspace preferences



Importing/Exporting Workspace Preferences from workbench



Exporting Workspace Preferences

Workspace preferences can be exported using the Export wizard. Right click in the Capella Project Explorer and choose Export.

Fig. Lauching the export wizard



In the export page choose Preferences and click Next.

Fig. Export Preferences Wizard

Choose the preferences to export and click on Finish to save them to a file in a Capella configuration project or in the file system.

Exporting Validation Preferences

Validation preferences can be exported only if there are different from the default settings. If you change validation workspace preferences you can export them.

Fig. Setting validation preferences

Fig. Exporting validation preferences



Importing Workspace Preferences

Preferences can be imported using the Import wizard. Right click in the Capella Project Explorer and choose Import.

Fig. Launching the import wizard

In the export page choose Preferences and click Next. In the next page you can choose which preferences you want to import.

Fig. Choosing preferences to import into the workspace

Example of export/import mechanism

To show how the workspace preference export/import mechanism works let’s consider the following scenario:

  1. User 1 exports a set of preferences to “user1_preferences.epf”
  2. User 2 starts Capella on a clean workspace (i.e. having default preferences) and make some changes
  3. User 2 imports the “user1_preferences.epf”



The following table gives the set of preferences in each step.

Preferences


'''Preferences
'''exported by User 1

Modification performed by User 2

'''Preferences
imported by User 2'''

Remarks

MA

delete/Confirm…

N

Y

N

We get the same preferences
that we have exported

delete/If reusing...

N

Y

N

Model/Inherit

Y

N

Y

Model/deploy

N

Y

N

Model Validation

DCOM_14

N

N

N

Exported preferences are different
from imported ones(1)

DCOM_15

Y

N

Y

DCOM_16

N

Y

Y



  1. This is the default behavior of Eclipse: the exported file stores only the preferences that differs from default, unchanged preferences are not exported.





You can choose to import only MA preferences and not validation ones to let the latter unchanged. You can also use a validation profile to get exactly the validation preferences that was exported.



Initializing Workspace Preferences with launch arguments (-EPF)

Workspaces can be initialized at Capella startup using the following command line argument:

-EPF <absolute/path/to/file.epf>

Capella will initialize the Workspace with the preferences stored in the provided file.

Example of initialization with -EPF

To show how the workspace initialization with –EPF argument works let’s consider the following scenario:

  1. User 1 exports a set of preferences to “user1_preferences.epf”
  2. User 2 starts Capella on a clean or dirty workspace with –EPF “user1_preferences.epf”



The following table gives the preferences in each step

Preferences


'''Preferences
to export'''

'''Preferences
after Import'''

Remarks

MA

delete/Confirm…

N

N

We get the same preferences
that we have exported

delete/If reusing...

N

N

Model/Inherit

Y

Y

Model/deploy

N

N

Model Validation

DCOM_14

N

N

DCOM_15

Y

Y

DCOM_16

N

N





Capella Project specific preferences

Capella Project specific preferences can be set on a Capella project to override Workspace preferences.

Capella Project specific preferences are set by right clicking on the project in Capella Project Explorer, and choosing properties menu.

To see .settings folder containing these local preferences, filtered by default, go to Capella Project Explorer and select “Customize View…” dialog, uncheck “*.resources” choice.


Capella Project specific preferences will override Workspace preferences.






Fig.2: Setting Capella Project specific preferences



Creating project specific preferences overrides workspace preferences.

To go back to Workspace preferences all you need is to delete the “.settings” folder from the project.





Capella Configuration Project

Capella Configuration Projects can be used to externalize preferences settings, thus enabling to reuse them on several projects. They can be referenced by any Capella projects to reuse the saved preferences saved in this configuration.

Creating Capella Configuration Project

Capella Configuration Projects can be created by right clicking in the Capella project explorer and choosing "Capella Configuration Project" menu.

Fig.: Capella Configuration Project creation wizard



Referencing Capella Configuration Project

Capella Configuration Project is used to store a specific configuration of preferences. Capella projects can reuse the preferences set on the Capella Configuration Project by referencing it.

Referencing a Capella Configuration Project is done by right clicking on a Capella project, choosing properties and selecting projects to reference in Capella Project References option.

Fig.: Referencing Capella Configuration project



Referencing a Capella Configuration Project from a Capella project will override Capella Project specific preferences and Workspace preferences for this project.



For Capella Team solution, the only way to apply shared preferences is to reference a remote read-only Capella Configuration Project from each Capella Team connection project.





Validation Profiles

Validation profile is a mean to specify validation rule sets, thus enabling configuration reuse during validation of Capella model elements.

Creating Validation Profiles

Validation profiles are created via Capella Export Preferences wizard and stored in standard Eclipse preferences files (with “.epf” file extension). Validation rule sets can be configured via Window > Preferences menu and exported with the Export Preferences wizard.

Exported preferences (Validation profiles) can be stored into a Capella Configuration Project or to another path into the file system. Storing exported preferences to Capella Configuration Project enables reusing them for Capella model validation.





Fig.: storing exported validation preferences to a Capella Configuration Project





Using Validation Profiles

Validation profiles (preferences files stored into Capella Configuration Project) can be used during validation of Capella model elements. To enable this usage on a Capella project, a Capella Configuration Project containing at least one preferences file has to be referenced. All referenced validation profiles are then available during validation.

Fig.: Using Validation profiles preferences for validation